package com.lanju.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;
@Entity
@Table(name="lj_household")
public class HouseHold implements Serializable{
	
	private static final long serialVersionUID = -1600219019264329257L;
	
	private Integer holdId;
	
	private String houldName;
	
	private Integer sex;

	private String headUrl;
	
	private Date experienceTime;
	
	private String introduction;
	
	private Date createTime;
	
	private String creator;
	
	private String phone;
	
	private Date updateTime;
	
	private String updator;
	
	private SystemAdmin systemAdmin;

	 @Id
	 @Column(name = "holdId", unique = true, nullable = false)
	 @GeneratedValue(strategy=GenerationType.AUTO)
	public Integer getHoldId() {
		return holdId;
	}

	public void setHoldId(Integer holdId) {
		this.holdId = holdId;
	}
	@Column(name = "houldName",length=255)
	public String getHouldName() {
		return houldName;
	}

	public void setHouldName(String houldName) {
		this.houldName = houldName;
	}
	@Column(name = "sex")
	public Integer getSex() {
		return sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}

	@Column(name = "experienceTime")
	public Date getExperienceTime() {
		return experienceTime;
	}

	public void setExperienceTime(Date experienceTime) {
		this.experienceTime = experienceTime;
	}
	@Column(name = "introduction")
	public String getIntroduction() {
		return introduction;
	}

	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}
	@Column(name = "createTime")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@Column(name = "creator")
	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}
	@Column(name = "updateTime")
	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	@Column(name = "updator")
	public String getUpdator() {
		return updator;
	}

	public void setUpdator(String updator) {
		this.updator = updator;
	}
	@Column(name = "headUrl")
	public String getHeadUrl() {
		return headUrl;
	}

	public void setHeadUrl(String headUrl) {
		this.headUrl = headUrl;
	}
	
   @JsonIgnore
   @OneToOne
   @JoinColumn(name="hId")
	public SystemAdmin getSystemAdmin() {
		return systemAdmin;
	}

	public void setSystemAdmin(SystemAdmin systemAdmin) {
		this.systemAdmin = systemAdmin;
	}
	@Column(name = "phone")
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
	
}
